package com.tlgen.modules.hospitalized.domain;

import com.tlgen.modules.common.domain.Nation;
import com.tlgen.modules.system.domain.User;
import lombok.Data;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * (Record)实体类
 *
 * @author makejava
 * @since 2020-07-30 17:20:54
 */
@Entity
@Data
@Table(name = "record")
public class Record implements Serializable {

    private static final long serialVersionUID = 847008161357915591L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @NotNull(groups = Record.Update.class)
    private Long id;

    public @interface Update {}

    /**
     * 姓名
     */
    private String name;

    /**
     * 性别
     */
    private String sex;

    /**
     * 年龄
     */
    private String age;

    /**
     * 婚否
     */
    private String wedding;

    /**
     * 医保号
     */
    private String medicinalcode;

    /**
     * 地址
     */
    private String address;

    /**
     * 手机号码
     */
    private String phone;

    /**
     * 药物过敏
     */
    private String history;

    /**
     * 民族
     */
    @OneToOne
    @JoinColumn(name = "nationid")
    private Nation nation;

}